package creationpattern.abstractfactorypattern;

public class ColorFactory extends AbstractFactory {
	@Override
	public Shape getShape(String s) {
		return null;
	}

	@Override
	public Color getColor(String s) {
		if(s == null) return null;
		else if(s.equalsIgnoreCase("RED")) {
			return new Red();
		}
		else if(s.equalsIgnoreCase("GREEN")) {
			return new Green();
		}
		else if(s.equalsIgnoreCase("BLUE")) {
			return new Blue();
		}
		
		return null;
	}

}
